Skip to content

Conversation

@performantdata
Copy link
Contributor

Change the lambda's name to match that of the corresponding method name (double) in the subsequent example.

Change the lambda's name to match that of the corresponding method name (`double`) in the subsequent example.
Copy link
Member

@Philippus Philippus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think doubles is the correct name, as you get doubles after the map has executed.
Maybe further down this line val doubles = nums.filter(underFive).map(double) could change to val doublesUnderFive = nums.filter(underFive).map(double).

@performantdata
Copy link
Contributor Author

@Philippus I think double is correct, as a verb that names the action that the function performs. But I don't disagree with this:

val doubles = nums.filter(underFive).map(double) could change to val doublesUnderFive = nums.filter(underFive).map(double).

Go with that if you want.

double also appears as the function name further down the page.

@bishabosha
Copy link
Member

bishabosha commented Jun 18, 2024

this change (aesthetic choice) does not bring value. perhaps find a grammar/spelling/syntax mistake

@bishabosha bishabosha closed this Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants